/*
 * PopupUserMessageReaction.hpp
 *
 *  Created on: Jul 5, 2012
 *      Author: guillou
 */

#ifndef POPUPUSERMESSAGEREACTION_HPP_
#define POPUPUSERMESSAGEREACTION_HPP_

#include <PopupLibTypes.hpp>
#include "PopupAbstractMessage.hpp"

namespace Popup
{
  struct RateUserMessageWrapper : public AbstractMessage, public RateUserMessage
  {
    enum
    {
      SOURCE_MSG_ID,
      SOURCE_MSG_SENDER,
      SOURCE_MSG_THREAD_ID,
      RATE_SENDER_ID,
      RATED_ITEM,
      IS_UNDO,
      TARGETS
    };

    //! Constructor used in order to send a message
    RateUserMessageWrapper(const RateUserMessage & p_reaction)
      : AbstractMessage(POPUP_MSG_TYPE_RATE_MESSAGE), reaction(p_reaction) {}

    //! Constructor used in order to receive a message
    RateUserMessageWrapper(const Message *p_message);

    virtual ~RateUserMessageWrapper() {}

    //!@Override
    bool onSend();

    //!@Override
    bool onReceive();

  private:
    RateUserMessage reaction;
  };
}

#endif /* POPUPUSERMESSAGEREACTION_HPP_ */
